package com.prs.crm.domain.assets;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.approval.Application;
/**
 * @author liaopinghong
 * @version 2012-6-5 8:59:19 资产大类
 * */


@Entity
@Table(name="ass_bigclass")
public class AssetsBigClass extends BaseEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;
	private String name;
	private String canzhi;
	private String zjnx;
	@OneToMany(fetch=FetchType.LAZY,mappedBy="assetsBigClass")
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Set<AssetsSmallClass> assetsSmallClasses;
	
	@OneToMany(fetch=FetchType.LAZY,mappedBy="assetsBigClass")
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Set<Application> application;
 	public Set<Application> getApplication() {
		return application;
	}
	public void setApplication(Set<Application> application) {
		this.application = application;
	}
	public Set<AssetsSmallClass> getAssetsSmallClasses() {
		return assetsSmallClasses;
	}
	public void setAssetsSmallClasses(Set<AssetsSmallClass> assetsSmallClasses) {
		this.assetsSmallClasses = assetsSmallClasses;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCanzhi() {
		return canzhi;
	}
	public void setCanzhi(String canzhi) {
		this.canzhi = canzhi;
	}
	public String getZjnx() {
		return zjnx;
	}
	public void setZjnx(String zjnx) {
		this.zjnx = zjnx;
	}
	
}
